package util

import (
	"log"
	"runtime/debug"
)

func ProtectCall(f func()) {
	defer func() {
		if i := recover(); i != nil {
			log.Printf("%+v", i)
			debug.PrintStack()
		}
	}()

	f()
}
